package com.atguigu.gmall.all.controller;

import com.atguigu.gmall.order.client.OrderInfoFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Map;

/**
 * @author 李旭
 * @date 2021/10/20 15:12
 * @Description:
 */
@Controller
public class OrderInfoController {

    @Autowired
    private OrderInfoFeignClient orderInfoFeignClient;
    //去结算页面
    @GetMapping("/trade.html")
    public String trade(Model model){
        Map trade = orderInfoFeignClient.trade();
        model.addAllAttributes(trade);
        return "order/trade";
    }
}
